<?php
/*cech*/
require '../GestionPermisos/config/conn.php';
   $vCOAC=$_POST["Txt_GA01COAC"];
   $vDEAC=$_POST["Txt_GA01DEAC"];
   $vMAAC=$_POST["Txt_GA01MAAC"];
   $vMOAC=$_POST["Txt_GA01MOAC"];
   $vSEAC=$_POST["Txt_GA01SEAC"];
   $vESAC=$_POST["Txt_GA01ESAC"];
   $vCOTP=$_POST["Txt_GA02COTP"];
   $vCOUB=$_POST["Txt_GA03COUB"];
    
    /*if ExisteRegistro("tb01docu", "NUDO",$factura,"A") then
    {*/
	
	if (empty($vCOAC) || empty($vDEAC)  || empty($vMAAC) || empty($vMOAC) || empty($vSEAC) || empty($vESAC) || empty($vCOTP) || empty($vCOUB))
    { 
    echo'<script language=javascript>
        alert("Complete el Formulario")
        self.location="mt01.php"
      </script>';
    
    } 

   else{
    $SQLstr = "INSERT INTO ga01activo (GA01COAC,GA01DEAC,GA01MAAC,GA01MOAC,GA01SEAC,GA01ESAC,GA02COTP,GA03COUB)
	             VALUES('$vCOAC','$vDEAC','$vMAAC','$vMOAC','$vSEAC','$vESAC','$vCOTP','$vCOUB');";
		
    if (!$conectarBD->query($SQLstr))
    {
      echo'<script language=javascript>
        alert("No se a podido registrar los datos")
        self.location="mt01.php"
      </script>';
    }
	else{
		echo'<script language=javascript>
        alert("Registrado con exitos")
        self.location="index.php"
      </script>';
		}
    $conectarBD->close();
   }
?>